package com.mall.user.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @className: com.mall.user.config-> SecurityConfig
 * @description: security配置
 * @author: wuyijie
 * @createDate: 2021/7/11 21:52
 */
@Configuration
public class SecurityConfig {
    /**
     * todo :这里配置PasswordEncoder,BCryptPasswordEncoder是security提供的PasswordEncorder的一个实现类
     *
     * @param
     * @return:org.springframework.security.crypto.password.PasswordEncoder
     * @Author: wuyijie
     * @Date: 2021/7/11 21:54
     */
    @Bean
    public PasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }
}
